package com.example.mall.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.mall.util.CodeGenerateUtils;

import java.io.Serializable;

/**
 * <p>
 * 支付回调记录表
 * </p>
 *
 * @author whale
 * @since 2025-05-09
 */
@TableName("tb_payment_callbacks")
public class PaymentCallbacks extends Model<PaymentCallbacks> {

    private static final long serialVersionUID = 1L;

    /**
     * 回调记录唯一标识
     */
    @TableId("callback_id")
    private Long callbackId;
    /**
     * 支付记录ID（关联支付记录表）
     */
    @TableField("payment_id")
    private Long paymentId;
    /**
     * 订单ID（关联订单主表）
     */
    @TableField("order_id")
    private Long orderId;
    /**
     * 回调状态（0：未处理，1：成功，2：失败）
     */
    @TableField("callback_status")
    private Integer callbackStatus;
    /**
     * 回调数据（JSON格式）
     */
    @TableField("callback_time")
    private String callbackTime;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;

    public PaymentCallbacks() {
        this.callbackId = Long.valueOf(CodeGenerateUtils.generateUniqueId());
    }

    public Long getCallbackId() {
        return callbackId;
    }

    public void setCallbackId(Long callbackId) {
        this.callbackId = callbackId;
    }

    public Long getPaymentId() {
        return paymentId;
    }

    public void setPaymentId(Long paymentId) {
        this.paymentId = paymentId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Integer getCallbackStatus() {
        return callbackStatus;
    }

    public void setCallbackStatus(Integer callbackStatus) {
        this.callbackStatus = callbackStatus;
    }

    public String getCallbackTime() {
        return callbackTime;
    }

    public void setCallbackTime(String callbackTime) {
        this.callbackTime = callbackTime;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return "PaymentCallbacks{" +
        ", callbackId=" + callbackId +
        ", paymentId=" + paymentId +
        ", orderId=" + orderId +
        ", callbackStatus=" + callbackStatus +
        ", callbackTime=" + callbackTime +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
